/*     */ package com.yc.web.station;
/*     */ 
/*     */ import com.yc.dao.model.DictionaryBO;
/*     */ import com.yc.dao.model.DistrictcodeBO;
/*     */ import com.yc.service.station.CommService;
/*     */ import com.yc.util.ListContentsBFO;
/*     */ import java.util.Iterator;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import org.apache.commons.logging.Log;
/*     */ import org.apache.commons.logging.LogFactory;
/*     */ 
/*     */ public class CommWeb
/*     */ {
/*  18 */   private static final Log log = LogFactory.getLog(CommWeb.class);
/*     */   CommService commService;
/*     */ 
/*     */   public CommWeb()
/*     */   {
/*  23 */     this.commService = new CommService();
/*     */   }
/*     */ 
/*     */   public String[][] getDirctoryByType(Map map)
/*     */   {
/*  28 */     String strType = map.get("DIRECTORY_TYPE").toString();
/*  29 */     log.info("strType = [" + strType + "]");
/*  30 */     List list = this.commService.getDirctoryByType(strType);
/*  31 */     String[][] typeData = (String[][])null;
/*  32 */     if ((list != null) && (list.size() > 0))
/*     */     {
/*  34 */       typeData = new String[list.size()][2];
/*  35 */       Iterator iterator = list.iterator();
/*  36 */       int num = 0;
/*  37 */       while (iterator.hasNext())
/*     */       {
/*  39 */         DictionaryBO bo = (DictionaryBO)iterator.next();
/*  40 */         typeData[num] = new String[]{ bo.getDicname(), bo.getDicname() };
/*  41 */         num++;
/*     */       }
/*     */     }
/*     */     else {
/*  45 */       typeData = new String[1][2];
/*  46 */       typeData[0] = new String[]{ "", "" };
/*     */     }
/*  48 */     return typeData;
/*     */   }
/*     */ 
/*     */   public String[][] scdqxslist(Map map)
/*     */   {
/*  54 */     List list = null;
/*     */     try {
/*  56 */       list = this.commService.scdqxslist();
/*     */     }
/*     */     catch (Exception e) {
/*  59 */       e.printStackTrace();
/*  60 */       return null;
/*     */     }
/*  62 */     String[][] typeData = (String[][])null;
/*  63 */     if ((list != null) && (list.size() > 0))
/*     */     {
/*  65 */       typeData = new String[list.size()][2];
/*  66 */       Iterator iterator = list.iterator();
/*  67 */       int num = 0;
/*  68 */       while (iterator.hasNext())
/*     */       {
/*  70 */         DistrictcodeBO bo = (DistrictcodeBO)iterator.next();
/*  71 */         typeData[num] = new String[]{ bo.getDistrict(), bo.getDistrict() };
/*  72 */         num++;
/*     */       }
/*     */     }
/*     */     else {
/*  76 */       typeData = new String[1][2];
/*  77 */       typeData[0] = new String[]{ "", "" };
/*     */     }
/*  79 */     return typeData;
/*     */   }
/*     */ 
/*     */   public ListContentsBFO getDicList(Map condition) {
/*  83 */     return this.commService.getDicList(condition);
/*     */   }
/*     */ 
/*     */   public boolean saveDict(DictionaryBO bo) {
/*  87 */     if ((bo.getId() == null) || ("".equalsIgnoreCase(bo.getId().trim()))) {
/*  88 */       return this.commService.saveDict(bo);
/*     */     }
/*  90 */     return this.commService.updateDict(bo);
/*     */   }
/*     */ 
/*     */   public boolean deleteDic(String strId) {
/*  94 */     return this.commService.deleteDic(strId);
/*     */   }
/*     */ 
/*     */   public String[][] qetDictTypeList(Map map) throws Exception {
/*  98 */     List list = null;
/*     */     try {
/* 100 */       list = this.commService.qetDictTypeList();
/*     */     }
/*     */     catch (Exception e) {
/* 103 */       e.printStackTrace();
/* 104 */       return null;
/*     */     }
/* 106 */     String[][] typeData = (String[][])null;
/* 107 */     if ((list != null) && (list.size() > 0))
/*     */     {
/* 109 */       typeData = new String[list.size() + 1][2];
/* 110 */       Iterator iterator = list.iterator();
/* 111 */       int num = 0;
/* 112 */       while (iterator.hasNext())
/*     */       {
/* 114 */         DictionaryBO bo = (DictionaryBO)iterator.next();
/* 115 */         typeData[num] = new String[]{ bo.getDictype(), bo.getDictypename() };
/* 116 */         num++;
/*     */       }
/* 118 */       typeData[num] = new String[]{ "", "全部" };
/*     */     }
/*     */     else {
/* 121 */       typeData = new String[1][2];
/* 122 */       typeData[0] = new String[]{ "", "全部" };
/*     */     }
/* 124 */     return typeData;
/*     */   }
/*     */ }

/* Location:           E:\java\apache-tomcat-6.0.36\webapps\btsm\WEB-INF\classes\
 * Qualified Name:     com.yc.web.station.CommWeb
 * JD-Core Version:    0.6.2
 */